# def get_number():
#     num = input("请输入一个数字：")
#     num = int(num)
#     return num
# print(get_number())

# def show():
#     print("循环前输出内容")
#     for i in range(10):
#         print(i)
#         if i == 2:
#             return
#     print("循环后输出内容")
#
# print("函数调用前输出内容")
# show()
# print("函数调用后输出内容")

# def printMsg(n, msg):
#     for i in range(n):
#         print(f'第{i+1}次输出{msg}')
#
# # 正确使用位置参数
# printMsg(5, "Hogworts")
# # 错误使用位置参数
# printMsg("Hogworts", 5)

# # 不确定个数数字求和
# def my_sum(*args):
#     print(args)
#     print(*args)
#     print(type(args))
# my_sum(1,2,3)
# my_sum(1,2,3,4)

# 定义可变关键字参数
def print_info(**kwargs):
    print(kwargs)
    print(type(kwargs))

print_info(Tom=18, Jim=20)
print_info(name="tom",age=22,gender="male")
